<template>
  <div>
    <input v-model="message" type="text" />
    <button @click="sendMessage">发送</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: "",
    };
  },
  methods: {
    sendMessage() {
      this.$emit("message", this.message);
    },
  },
};
</script>
